<template>
    <div>
        <div class="box">
            <div>
                <ul class=" werf">
                    <li class="float"><span>提现进度</span></li>
                    <li class="float left"><span>订单状态:</span><span class="colorr">{{audit}}</span></li>
                </ul>
            </div>
            <div class="clearfix info-box">
                <ul class="clearfix marger">
                    <li class="circle float backcolor top"></li>
                    <li class="schedule float backcolor"></li>
                    <li class="circle float backcolor top"></li>
                    <li :class="styue"></li>
                    <li><span :class="[yes>0?'xuebyes':'xuebNo']"></span></li>                   
                </ul>
                <ul class="clearfix leftul">
                    <li class="float sqleft"><p>提现申请</p><p>{{regtime}}</p></li>
                    <li class="cont float"></li>
                    <li class="float shleft"><p>正在审核</p><p>{{regtime}}</p></li>
                    <li class="cont float"></li>
                    <li :class="[hieg>0?'float wxleft':'float wxlefty']"><p >{{auditacc}}</p><p>{{hieg ==0?'':verifytime}}</p></li>
                </ul>
            </div>
        </div>
        </div>
</template>
<script>
import formatDate from '../../../common/js/date.js';
    export default {
        data () {
            return {
                hieg:0,
                regtime:null,
                verifytime:null,
                styue:"schedule float",
                yes:1,
                auditacc:"审核完成",
                audit:"审核中......",
                flag:"",
                back:"circle float backcolor coler top",
                params:{
                    token:"",
                    cash_id:""
                }
            }
        },
        created () {
            this.params.token=localStorage.getItem("token"),
            this.params.cash_id=localStorage.getItem('cash_id')
            this.$http.post("?m=api&c=cash&a=presentState",this.params)
            .then(res=>{
                this.flag = res.data.type
                if(res.data.status == 0){
                  if(this.flag==0){
                    this.styue="schedule float"
                    this.hieg = 0
                  }else if(this.flag==1){
                    this.styue="schedule float backcolor"
                    this.yes="1"
                    this.audit="审核通过"
                    this.auditacc="审核通过"
                    this.$emit('statusFlag',2);
                    this.hieg = 1
                  }else if(this.flag==2){
                    this.styue="schedule float backcolor backcolorNo"
                    this.yes="0"
                    this.hieg = 1
                    this.audit="审核失败"
                    this.auditacc="审核失败"
                    this.back = "circle float backcolorred coler"
                    this.$emit('statusFlag',2);
                  }else if (this.flag==3) {
                  }
                }
                this.regtime = formatDate(new Date( res.data.addtime* 1000), 'yyyy-MM-dd hh:mm')
                this.verifytime = formatDate(new Date( res.data.verifytime* 1000), 'yyyy-MM-dd hh:mm')
            })
        }
    }
</script>
<style scoped>
    .colorr{
        color: grey;
    }
    .xuebNo{
        display: inline-block;
        width: 35px;
        height: 35px;
        /* background: url("../../../html/images/spirt.png")no-repeat; */
        background-position: -280px -280px;
        margin-left: -241px;
        margin-top: -14px;
    }
    .xuebyes{
        display: inline-block;
        width: 35px;
        height: 35px;
        /* background: url("../../../html/images/spirt.png")no-repeat; */
        background-position: -280px -315px;
        margin-left: -241px;
        margin-top: -14px;
    }
    .top{
        position: relative;
        top:-7px;
    }
    .marger{
        margin-left: 30px;
    }
    .left{
        margin-left:630px; 
        margin-top: -4px
    }
    .cont{
        width: 150px;
        height: 10px;
    }
    .schedule{
        width: 260px;
        height: 10px;
        border: 1px solid #EEE;
        
    }
    .circle{
        width: 30px;
        height: 30px;
        border-radius:50%;
        margin-top:-3px; 
        text-align: center;
        line-height: 15px;  
    }
    .backcolor{
        background:rgb(149,214,25); 
    }
    .backcolorNo{
        background:rgb(237,56,44);
    }
    .backcolorred{
    background:rgb(237,56,44);
    position: relative;
    top: -7px;
    }
    .coler{
        color: white;
        font-size: 20px;
        line-height: 30px;
    }
    .float{
        float: left;
    }
    .box{
        width: 880px;
        border: 1px solid #EEE;
        margin-top:40px; 
    }
    .werf{
        padding: 20px;
        line-height: 6px;
        border-bottom:1px solid #EEE; 
    }
    .info-box{
        width: 880px;
        margin: 80px 120px;
        text-align: center
    }
    .info-weaf{
        width:880px;
        height:126px; 
        background:rgba(255,252,238,1);
        border-radius: 4px ; 
        border: 1px solid #EEE;
        line-height: 30px;
        margin-top: 30px;
        
    }
    .info-weaf p{
        margin-left:30px; 
    }
    li.float.wxleft {
    margin-left: 35px;
    }
    li.float.wxlefty {
    margin-left: 60px;
    }
    li.float.shleft {
    margin-left: 30px;
    }
    li.float.sqleft {
    margin-left: -14px;
    }
</style>



// WEBPACK FOOTER //
// src/components/personalCenter/present/present.vue